package online.foxnull2.foxmall.order.feign;

import online.foxnull2.common.utils.R;
import online.foxnull2.foxmall.order.vo.wareSkuLock.WareSkuLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Set;

@FeignClient("foxmall-ware")
public interface WareFeignService {

    @PostMapping("/ware/waresku/hasstock")
    Set<Long> getSkuHasStock(@RequestBody List<Long> skuIds);

    @GetMapping("/ware/wareinfo/{addressId}/freight")
    R getFreightByAddressId(@PathVariable("addressId") Long addressId);

    @PostMapping("/ware/waresku/lock/order/sku")
    R orderSkuLockStock(@RequestBody WareSkuLockVo wareSkuLockVo);
}
